package com.yoda.mall.model.dto;

import com.yoda.mall.model.entity.sms.HomeNewProduct;
import com.yoda.mall.model.entity.sms.HomeRecommendSubject;
import lombok.Data;
import org.springframework.beans.BeanUtils;

/**
 * @author shawn
 * @date 2022年 12月 17日 11:47
 */
@Data
public class SubjectDto {
    private Long subjectId;
    private String subjectName;

    public static HomeRecommendSubject initRecommendSubject(SubjectDto dto){
        HomeRecommendSubject recommendSubject = new HomeRecommendSubject();
        BeanUtils.copyProperties(dto,recommendSubject);
        recommendSubject.setSort(0);
        recommendSubject.setRecommendStatus(0);
        return recommendSubject;
    }
}
